#!/bin/bash

# removes files with ~ ending and .svn subdirectories


function processEntity()
{ 
  
  if [ -d $1 ]; then
    #echo "dir $1";
    
    rm -rf "$1/.svn";
    
    rm -rf "$1/*~"; 
    
    for file in $1/*; do
      processEntity $file;
    done
     
  #else
    #echo "not $1";
  fi
  
}


echo $1

processEntity $1;


